ostree_repo_commit_transaction_with_stats
ostree_repo_abort_transaction
ostree_repo_has_object
-ostree_repo_stage_metadata
-ostree_repo_stage_metadata_async
-ostree_repo_stage_metadata_finish
-ostree_repo_stage_metadata_trusted
-ostree_repo_stage_content
-ostree_repo_stage_content_trusted
-ostree_repo_stage_content_async
-ostree_repo_stage_content_finish
+ostree_repo_write_metadata
+ostree_repo_write_metadata_async
+ostree_repo_write_metadata_finish
+ostree_repo_write_metadata_trusted
+ostree_repo_write_content
+ostree_repo_write_content_trusted
+ostree_repo_write_content_async
+ostree_repo_write_content_finish
ostree_repo_resolve_rev
ostree_repo_write_ref
ostree_repo_write_refspec
ostree_repo_commit_modifier_new
ostree_repo_commit_modifier_ref
ostree_repo_commit_modifier_unref
-ostree_repo_stage_directory_to_mtree
-ostree_repo_stage_archive_to_mtree
-ostree_repo_stage_mtree
-ostree_repo_stage_commit
+ostree_repo_write_directory_to_mtree
+ostree_repo_write_archive_to_mtree
+ostree_repo_write_mtree
+ostree_repo_write_commit
OstreeRepoCheckoutMode
OstreeRepoCheckoutOverwriteMode
ostree_repo_checkout_tree
}
static gboolean
-stage_object (OstreeRepo *self,
+write_object (OstreeRepo *self,
OstreeObjectType objtype,
const char *expected_checksum,
GInputStream *input,
}
/**
- * ostree_repo_stage_metadata:
+ * ostree_repo_write_metadata:
* @self: Repo
* @objtype: Object type
* @expected_checksum: (allow-none): If provided, validate content against this checksum
* computed checksum.
*/
gboolean
-ostree_repo_stage_metadata (OstreeRepo *self,
+ostree_repo_write_metadata (OstreeRepo *self,
OstreeObjectType objtype,
const char *expected_checksum,
GVariant *object,
normalized = g_variant_get_normal_form (object);
input = ot_variant_read (normalized);
- return stage_object (self, objtype, expected_checksum, input, 0, out_csum,
+ return write_object (self, objtype, expected_checksum, input, 0, out_csum,
cancellable, error);
}
/**
- * ostree_repo_stage_metadata_trusted:
+ * ostree_repo_write_metadata_trusted:
* @self: Repo
* @objtype: Object type
* @checksum: Store object with this ASCII SHA256 checksum
* trusted.
*/
gboolean
-ostree_repo_stage_metadata_trusted (OstreeRepo *self,
+ostree_repo_write_metadata_trusted (OstreeRepo *self,
OstreeObjectType type,
const char *checksum,
GVariant *variant,
normalized = g_variant_get_normal_form (variant);
input = ot_variant_read (normalized);
- return stage_object (self, type, checksum, input, 0, NULL,
+ return write_object (self, type, checksum, input, 0, NULL,
cancellable, error);
}
GSimpleAsyncResult *result;
guchar *result_csum;
-} StageMetadataAsyncData;
+} WriteMetadataAsyncData;
static void
-stage_metadata_async_data_free (gpointer user_data)
+write_metadata_async_data_free (gpointer user_data)
{
- StageMetadataAsyncData *data = user_data;
+ WriteMetadataAsyncData *data = user_data;
g_clear_object (&data->repo);
g_clear_object (&data->cancellable);
}
static void
-stage_metadata_thread (GSimpleAsyncResult *res,
+write_metadata_thread (GSimpleAsyncResult *res,
GObject *object,
GCancellable *cancellable)
{
GError *error = NULL;
- StageMetadataAsyncData *data;
+ WriteMetadataAsyncData *data;
data = g_simple_async_result_get_op_res_gpointer (res);
- if (!ostree_repo_stage_metadata (data->repo, data->objtype, data->expected_checksum,
+ if (!ostree_repo_write_metadata (data->repo, data->objtype, data->expected_checksum,
data->object,
&data->result_csum,
cancellable, &error))
}
/**
- * ostree_repo_stage_metadata_async:
+ * ostree_repo_write_metadata_async:
* @self: Repo
* @objtype: Object type
* @expected_checksum: (allow-none): If provided, validate content against this checksum
* @object: Metadata
* @cancellable: Cancellable
- * @callback: Invoked when metadata is staged
+ * @callback: Invoked when metadata is writed
* @user_data: Data for @callback
*
* Asynchronously store the metadata object @variant. If provided,
* the checksum @expected_checksum will be verified.
*/
void
-ostree_repo_stage_metadata_async (OstreeRepo *self,
+ostree_repo_write_metadata_async (OstreeRepo *self,
OstreeObjectType objtype,
const char *expected_checksum,
GVariant *object,
GAsyncReadyCallback callback,
gpointer user_data)
{
- StageMetadataAsyncData *asyncdata;
+ WriteMetadataAsyncData *asyncdata;
- asyncdata = g_new0 (StageMetadataAsyncData, 1);
+ asyncdata = g_new0 (WriteMetadataAsyncData, 1);
asyncdata->repo = g_object_ref (self);
asyncdata->objtype = objtype;
asyncdata->expected_checksum = g_strdup (expected_checksum);
asyncdata->result = g_simple_async_result_new ((GObject*) self,
callback, user_data,
- ostree_repo_stage_metadata_async);
+ ostree_repo_write_metadata_async);
g_simple_async_result_set_op_res_gpointer (asyncdata->result, asyncdata,
- stage_metadata_async_data_free);
- g_simple_async_result_run_in_thread (asyncdata->result, stage_metadata_thread, G_PRIORITY_DEFAULT, cancellable);
+ write_metadata_async_data_free);
+ g_simple_async_result_run_in_thread (asyncdata->result, write_metadata_thread, G_PRIORITY_DEFAULT, cancellable);
g_object_unref (asyncdata->result);
}
gboolean
-ostree_repo_stage_metadata_finish (OstreeRepo *self,
+ostree_repo_write_metadata_finish (OstreeRepo *self,
GAsyncResult *result,
guchar **out_csum,
GError **error)
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
- StageMetadataAsyncData *data;
+ WriteMetadataAsyncData *data;
- g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == ostree_repo_stage_metadata_async);
+ g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == ostree_repo_write_metadata_async);
if (g_simple_async_result_propagate_error (simple, error))
return FALSE;
}
gboolean
-_ostree_repo_stage_directory_meta (OstreeRepo *self,
+_ostree_repo_write_directory_meta (OstreeRepo *self,
GFileInfo *file_info,
GVariant *xattrs,
guchar **out_csum,
dirmeta = ostree_create_directory_metadata (file_info, xattrs);
- return ostree_repo_stage_metadata (self, OSTREE_OBJECT_TYPE_DIR_META, NULL,
+ return ostree_repo_write_metadata (self, OSTREE_OBJECT_TYPE_DIR_META, NULL,
dirmeta, out_csum, cancellable, error);
}
}
/**
- * ostree_repo_stage_content_trusted:
+ * ostree_repo_write_content_trusted:
* @self: Repo
* @checksum: Store content using this ASCII SHA256 checksum
* @object_input: Content stream
* disk, for example.
*/
gboolean
-ostree_repo_stage_content_trusted (OstreeRepo *self,
+ostree_repo_write_content_trusted (OstreeRepo *self,
const char *checksum,
GInputStream *object_input,
guint64 length,
GCancellable *cancellable,
GError **error)
{
- return stage_object (self, OSTREE_OBJECT_TYPE_FILE, checksum,
+ return write_object (self, OSTREE_OBJECT_TYPE_FILE, checksum,
object_input, length, NULL,
cancellable, error);
}
/**
- * ostree_repo_stage_content:
+ * ostree_repo_write_content:
* @self: Repo
* @expected_checksum: (allow-none): If provided, validate content against this checksum
* @object_input: Content object stream
* be returned as @out_csum.
*/
gboolean
-ostree_repo_stage_content (OstreeRepo *self,
+ostree_repo_write_content (OstreeRepo *self,
const char *expected_checksum,
GInputStream *object_input,
guint64 length,
GCancellable *cancellable,
GError **error)
{
- return stage_object (self, OSTREE_OBJECT_TYPE_FILE, expected_checksum,
+ return write_object (self, OSTREE_OBJECT_TYPE_FILE, expected_checksum,
object_input, length, out_csum,
cancellable, error);
}
GSimpleAsyncResult *result;
guchar *result_csum;
-} StageContentAsyncData;
+} WriteContentAsyncData;
static void
-stage_content_async_data_free (gpointer user_data)
+write_content_async_data_free (gpointer user_data)
{
- StageContentAsyncData *data = user_data;
+ WriteContentAsyncData *data = user_data;
g_clear_object (&data->repo);
g_clear_object (&data->cancellable);
}
static void
-stage_content_thread (GSimpleAsyncResult *res,
+write_content_thread (GSimpleAsyncResult *res,
GObject *object,
GCancellable *cancellable)
{
GError *error = NULL;
- StageContentAsyncData *data;
+ WriteContentAsyncData *data;
data = g_simple_async_result_get_op_res_gpointer (res);
- if (!ostree_repo_stage_content (data->repo, data->expected_checksum,
+ if (!ostree_repo_write_content (data->repo, data->expected_checksum,
data->object, data->file_object_length,
&data->result_csum,
cancellable, &error))
}
/**
- * ostree_repo_stage_content_async:
+ * ostree_repo_write_content_async:
* @self: Repo
* @expected_checksum: (allow-none): If provided, validate content against this checksum
* @object: Input
* @length: Length of @object
* @cancellable: Cancellable
- * @callback: Invoked when content is staged
+ * @callback: Invoked when content is writed
* @user_data: User data for @callback
*
* Asynchronously store the content object @object. If provided, the
* checksum @expected_checksum will be verified.
*/
void
-ostree_repo_stage_content_async (OstreeRepo *self,
+ostree_repo_write_content_async (OstreeRepo *self,
const char *expected_checksum,
GInputStream *object,
guint64 length,
GAsyncReadyCallback callback,
gpointer user_data)
{
- StageContentAsyncData *asyncdata;
+ WriteContentAsyncData *asyncdata;
- asyncdata = g_new0 (StageContentAsyncData, 1);
+ asyncdata = g_new0 (WriteContentAsyncData, 1);
asyncdata->repo = g_object_ref (self);
asyncdata->expected_checksum = g_strdup (expected_checksum);
asyncdata->object = g_object_ref (object);
asyncdata->result = g_simple_async_result_new ((GObject*) self,
callback, user_data,
- ostree_repo_stage_content_async);
+ ostree_repo_write_content_async);
g_simple_async_result_set_op_res_gpointer (asyncdata->result, asyncdata,
- stage_content_async_data_free);
- g_simple_async_result_run_in_thread (asyncdata->result, stage_content_thread, G_PRIORITY_DEFAULT, cancellable);
+ write_content_async_data_free);
+ g_simple_async_result_run_in_thread (asyncdata->result, write_content_thread, G_PRIORITY_DEFAULT, cancellable);
g_object_unref (asyncdata->result);
}
/**
- * ostree_repo_stage_content_finish:
+ * ostree_repo_write_content_finish:
* @self: a #OstreeRepo
* @result: a #GAsyncResult
* @out_csum: (out) (transfer full): A binary SHA256 checksum of the content object
* @error: a #GError
*
- * Completes an invocation of ostree_repo_stage_content_async().
+ * Completes an invocation of ostree_repo_write_content_async().
*/
gboolean
-ostree_repo_stage_content_finish (OstreeRepo *self,
+ostree_repo_write_content_finish (OstreeRepo *self,
GAsyncResult *result,
guchar **out_csum,
GError **error)
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
- StageContentAsyncData *data;
+ WriteContentAsyncData *data;
- g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == ostree_repo_stage_content_async);
+ g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == ostree_repo_write_content_async);
if (g_simple_async_result_propagate_error (simple, error))
return FALSE;
}
/**
- * ostree_repo_stage_commit:
+ * ostree_repo_write_commit:
* @self: Repo
* @branch: Name of ref
* @parent: (allow-none): ASCII SHA256 checksum for parent, or %NULL for none
* and @root_metadata_checksum.
*/
gboolean
-ostree_repo_stage_commit (OstreeRepo *self,
+ostree_repo_write_commit (OstreeRepo *self,
const char *branch,
const char *parent,
const char *subject,
ostree_checksum_to_bytes_v (root_contents_checksum),
ostree_checksum_to_bytes_v (root_metadata_checksum));
g_variant_ref_sink (commit);
- if (!ostree_repo_stage_metadata (self, OSTREE_OBJECT_TYPE_COMMIT, NULL,
+ if (!ostree_repo_write_metadata (self, OSTREE_OBJECT_TYPE_COMMIT, NULL,
commit, &commit_csum,
cancellable, error))
goto out;
}
static gboolean
-stage_directory_to_mtree_internal (OstreeRepo *self,
+write_directory_to_mtree_internal (OstreeRepo *self,
GFile *dir,
OstreeMutableTree *mtree,
OstreeRepoCommitModifier *modifier,
goto out;
}
- if (!_ostree_repo_stage_directory_meta (self, modified_info, xattrs, &child_file_csum,
+ if (!_ostree_repo_write_directory_meta (self, modified_info, xattrs, &child_file_csum,
cancellable, error))
goto out;
if (!ostree_mutable_tree_ensure_dir (mtree, name, &child_mtree, error))
goto out;
- if (!stage_directory_to_mtree_internal (self, child, child_mtree,
+ if (!write_directory_to_mtree_internal (self, child, child_mtree,
modifier, path,
cancellable, error))
goto out;
&file_object_input, &file_obj_length,
cancellable, error))
goto out;
- if (!ostree_repo_stage_content (self, NULL, file_object_input, file_obj_length,
+ if (!ostree_repo_write_content (self, NULL, file_object_input, file_obj_length,
&child_file_csum, cancellable, error))
goto out;
}
/**
- * ostree_repo_stage_directory_to_mtree:
+ * ostree_repo_write_directory_to_mtree:
* @self: Repo
* @dir: Path to a directory
* @mtree: Overlay directory contents into this tree
* overlaying the resulting filesystem hierarchy into @mtree.
*/
gboolean
-ostree_repo_stage_directory_to_mtree (OstreeRepo *self,
+ostree_repo_write_directory_to_mtree (OstreeRepo *self,
GFile *dir,
OstreeMutableTree *mtree,
OstreeRepoCommitModifier *modifier,
GPtrArray *path = NULL;
path = g_ptr_array_new ();
- if (!stage_directory_to_mtree_internal (self, dir, mtree, modifier, path,
+ if (!write_directory_to_mtree_internal (self, dir, mtree, modifier, path,
cancellable, error))
goto out;
}
/**
- * ostree_repo_stage_mtree:
+ * ostree_repo_write_mtree:
* @self: Repo
* @mtree: Mutable tree
* @out_contents_checksum: (out): Return location for ASCII checksum
* %OSTREE_OBJECT_TYPE_DIR_TREE object.
*/
gboolean
-ostree_repo_stage_mtree (OstreeRepo *self,
+ostree_repo_write_mtree (OstreeRepo *self,
OstreeMutableTree *mtree,
char **out_contents_checksum,
GCancellable *cancellable,
OstreeMutableTree *child_dir = value;
char *child_dir_contents_checksum;
- if (!ostree_repo_stage_mtree (self, child_dir, &child_dir_contents_checksum,
+ if (!ostree_repo_write_mtree (self, child_dir, &child_dir_contents_checksum,
cancellable, error))
goto out;
dir_contents_checksums,
dir_metadata_checksums);
- if (!ostree_repo_stage_metadata (self, OSTREE_OBJECT_TYPE_DIR_TREE, NULL,
+ if (!ostree_repo_write_metadata (self, OSTREE_OBJECT_TYPE_DIR_TREE, NULL,
serialized_tree, &contents_csum,
cancellable, error))
goto out;
&file_object_input, &length, cancellable, error))
goto out;
- if (!ostree_repo_stage_content (self, NULL, file_object_input, length, out_csum,
+ if (!ostree_repo_write_content (self, NULL, file_object_input, length, out_csum,
cancellable, error))
goto out;
}
static gboolean
-stage_libarchive_entry_to_mtree (OstreeRepo *self,
+write_libarchive_entry_to_mtree (OstreeRepo *self,
OstreeMutableTree *root,
struct archive *a,
struct archive_entry *entry,
if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY)
{
- if (!_ostree_repo_stage_directory_meta (self, file_info, NULL, &tmp_csum, cancellable, error))
+ if (!_ostree_repo_write_directory_meta (self, file_info, NULL, &tmp_csum, cancellable, error))
goto out;
if (parent == NULL)
#endif
gboolean
-ostree_repo_stage_archive_to_mtree (OstreeRepo *self,
+ostree_repo_write_archive_to_mtree (OstreeRepo *self,
GFile *archive_f,
OstreeMutableTree *root,
OstreeRepoCommitModifier *modifier,
g_file_info_set_attribute_uint32 (tmp_dir_info, "unix::gid", archive_entry_gid (entry));
g_file_info_set_attribute_uint32 (tmp_dir_info, "unix::mode", 0755 | S_IFDIR);
- if (!_ostree_repo_stage_directory_meta (self, tmp_dir_info, NULL, &tmp_csum, cancellable, error))
+ if (!_ostree_repo_write_directory_meta (self, tmp_dir_info, NULL, &tmp_csum, cancellable, error))
goto out;
}
- if (!stage_libarchive_entry_to_mtree (self, root, a,
+ if (!write_libarchive_entry_to_mtree (self, root, a,
entry, modifier,
autocreate_parents ? tmp_csum : NULL,
cancellable, error))
OstreeObjectType type);
gboolean
-_ostree_repo_stage_directory_meta (OstreeRepo *self,
+_ostree_repo_write_directory_meta (OstreeRepo *self,
GFileInfo *file_info,
GVariant *xattrs,
guchar **out_csum,
guint metadata_scan_idle : 1; /* TRUE if we passed through an idle message */
guint idle_serial; /* Incremented when we get a SCAN_IDLE message */
guint n_outstanding_metadata_fetches;
- guint n_outstanding_metadata_stage_requests;
+ guint n_outstanding_metadata_write_requests;
guint n_outstanding_content_fetches;
- guint n_outstanding_content_stage_requests;
+ guint n_outstanding_content_write_requests;
gint n_requested_metadata;
gint n_requested_content;
guint n_fetched_metadata;
{
OtPullData *pull_data = user_data;
GString *status;
- guint outstanding_stages;
+ guint outstanding_writes;
guint outstanding_fetches;
status = g_string_new ("");
outstanding_fetches = pull_data->n_outstanding_content_fetches + pull_data->n_outstanding_metadata_fetches;
- outstanding_stages = pull_data->n_outstanding_content_stage_requests + pull_data->n_outstanding_metadata_stage_requests;
+ outstanding_writes = pull_data->n_outstanding_content_write_requests + pull_data->n_outstanding_metadata_write_requests;
if (pull_data->fetching_sync_uri)
{
(guint)((((double)fetched) / requested) * 100),
fetched, requested, formatted_bytes_transferred);
}
- else if (outstanding_stages > 0)
- g_string_append_printf (status, "Writing objects: %u", outstanding_stages);
+ else if (outstanding_writes > 0)
+ g_string_append_printf (status, "Writing objects: %u", outstanding_writes);
else if (!pull_data->metadata_scan_idle)
g_string_append_printf (status, "Scanning metadata: %u",
g_atomic_int_get (&pull_data->n_scanned_metadata));
{
gboolean current_fetch_idle = (pull_data->n_outstanding_metadata_fetches == 0 &&
pull_data->n_outstanding_content_fetches == 0);
- gboolean current_stage_idle = (pull_data->n_outstanding_metadata_stage_requests == 0 &&
- pull_data->n_outstanding_content_stage_requests == 0);
+ gboolean current_write_idle = (pull_data->n_outstanding_metadata_write_requests == 0 &&
+ pull_data->n_outstanding_content_write_requests == 0);
g_debug ("pull: scan: %u fetching: %u staging: %u",
- !pull_data->metadata_scan_idle, !current_fetch_idle, !current_stage_idle);
+ !pull_data->metadata_scan_idle, !current_fetch_idle, !current_write_idle);
throw_async_error (pull_data, error);
g_main_loop_quit (pull_data->loop);
return;
}
- else if (pull_data->metadata_scan_idle && current_fetch_idle && current_stage_idle)
+ else if (pull_data->metadata_scan_idle && current_fetch_idle && current_write_idle)
{
g_main_loop_quit (pull_data->loop);
}
}
static void
-content_fetch_on_stage_complete (GObject *object,
+content_fetch_on_write_complete (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
gs_free guchar *csum = NULL;
gs_free char *checksum = NULL;
- if (!ostree_repo_stage_content_finish ((OstreeRepo*)object, result,
+ if (!ostree_repo_write_content_finish ((OstreeRepo*)object, result,
&csum, error))
goto out;
ostree_object_name_deserialize (fetch_data->object, &expected_checksum, &objtype);
g_assert (objtype == OSTREE_OBJECT_TYPE_FILE);
- g_debug ("stage of %s complete", ostree_object_to_string (checksum, objtype));
+ g_debug ("write of %s complete", ostree_object_to_string (checksum, objtype));
if (strcmp (checksum, expected_checksum) != 0)
{
pull_data->n_fetched_content++;
out:
- pull_data->n_outstanding_content_stage_requests--;
+ pull_data->n_outstanding_content_write_requests--;
check_outstanding_requests_handle_error (pull_data, local_error);
(void) gs_file_unlink (fetch_data->temp_path, NULL, NULL);
g_object_unref (fetch_data->temp_path);
cancellable, error))
goto out;
- pull_data->n_outstanding_content_stage_requests++;
- ostree_repo_stage_content_async (pull_data->repo, checksum,
+ pull_data->n_outstanding_content_write_requests++;
+ ostree_repo_write_content_async (pull_data->repo, checksum,
object_input, length,
cancellable,
- content_fetch_on_stage_complete, fetch_data);
+ content_fetch_on_write_complete, fetch_data);
out:
pull_data->n_outstanding_content_fetches--;
}
static void
-on_metadata_staged (GObject *object,
+on_metadata_writed (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
gs_free char *checksum = NULL;
gs_free guchar *csum = NULL;
- if (!ostree_repo_stage_metadata_finish ((OstreeRepo*)object, result,
+ if (!ostree_repo_write_metadata_finish ((OstreeRepo*)object, result,
&csum, error))
goto out;
ostree_object_name_deserialize (fetch_data->object, &expected_checksum, &objtype);
g_assert (OSTREE_OBJECT_TYPE_IS_META (objtype));
- g_debug ("stage of %s complete", ostree_object_to_string (checksum, objtype));
+ g_debug ("write of %s complete", ostree_object_to_string (checksum, objtype));
if (strcmp (checksum, expected_checksum) != 0)
{
pull_worker_message_new (PULL_MSG_SCAN,
g_variant_ref (fetch_data->object)));
out:
- pull_data->n_outstanding_metadata_stage_requests--;
+ pull_data->n_outstanding_metadata_write_requests--;
(void) gs_file_unlink (fetch_data->temp_path, NULL, NULL);
g_object_unref (fetch_data->temp_path);
g_variant_unref (fetch_data->object);
FALSE, &metadata, error))
goto out;
- ostree_repo_stage_metadata_async (pull_data->repo, objtype, checksum, metadata,
+ ostree_repo_write_metadata_async (pull_data->repo, objtype, checksum, metadata,
pull_data->cancellable,
- on_metadata_staged, fetch_data);
+ on_metadata_writed, fetch_data);
- pull_data->n_outstanding_metadata_stage_requests++;
+ pull_data->n_outstanding_metadata_write_requests++;
out:
pull_data->n_outstanding_metadata_fetches--;
pull_data->n_fetched_metadata++;
* To store content in the repo, first start a transaction with
* ostree_repo_prepare_transaction(). Then create a
* #OstreeMutableTree, and apply functions such as
- * ostree_repo_stage_directory_to_mtree() to traverse a physical
- * filesystem and stage content, possibly multiple times.
+ * ostree_repo_write_directory_to_mtree() to traverse a physical
+ * filesystem and write content, possibly multiple times.
*
- * Once the #OstreeMutableTree is complete, stage all of its metadata
- * with ostree_repo_stage_mtree(), and finally create a commit with
- * ostree_repo_stage_commit().
+ * Once the #OstreeMutableTree is complete, write all of its metadata
+ * with ostree_repo_write_mtree(), and finally create a commit with
+ * ostree_repo_write_commit().
*/
typedef struct {
GObjectClass parent_class;
GCancellable *cancellable,
GError **error);
-gboolean ostree_repo_stage_metadata (OstreeRepo *self,
+gboolean ostree_repo_write_metadata (OstreeRepo *self,
OstreeObjectType objtype,
const char *expected_checksum,
GVariant *object,
GCancellable *cancellable,
GError **error);
-void ostree_repo_stage_metadata_async (OstreeRepo *self,
+void ostree_repo_write_metadata_async (OstreeRepo *self,
OstreeObjectType objtype,
const char *expected_checksum,
GVariant *object,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean ostree_repo_stage_metadata_finish (OstreeRepo *self,
+gboolean ostree_repo_write_metadata_finish (OstreeRepo *self,
GAsyncResult *result,
guchar **out_csum,
GError **error);
-gboolean ostree_repo_stage_content (OstreeRepo *self,
+gboolean ostree_repo_write_content (OstreeRepo *self,
const char *expected_checksum,
GInputStream *object_input,
guint64 length,
GCancellable *cancellable,
GError **error);
-gboolean ostree_repo_stage_metadata_trusted (OstreeRepo *self,
+gboolean ostree_repo_write_metadata_trusted (OstreeRepo *self,
OstreeObjectType objtype,
const char *checksum,
GVariant *variant,
GCancellable *cancellable,
GError **error);
-gboolean ostree_repo_stage_content_trusted (OstreeRepo *self,
+gboolean ostree_repo_write_content_trusted (OstreeRepo *self,
const char *checksum,
GInputStream *object_input,
guint64 length,
GCancellable *cancellable,
GError **error);
-void ostree_repo_stage_content_async (OstreeRepo *self,
+void ostree_repo_write_content_async (OstreeRepo *self,
const char *expected_checksum,
GInputStream *object,
guint64 length,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean ostree_repo_stage_content_finish (OstreeRepo *self,
+gboolean ostree_repo_write_content_finish (OstreeRepo *self,
GAsyncResult *result,
guchar **out_csum,
GError **error);
OstreeRepoCommitModifier *ostree_repo_commit_modifier_ref (OstreeRepoCommitModifier *modifier);
void ostree_repo_commit_modifier_unref (OstreeRepoCommitModifier *modifier);
-gboolean ostree_repo_stage_directory_to_mtree (OstreeRepo *self,
+gboolean ostree_repo_write_directory_to_mtree (OstreeRepo *self,
GFile *dir,
OstreeMutableTree *mtree,
OstreeRepoCommitModifier *modifier,
GCancellable *cancellable,
GError **error);
-gboolean ostree_repo_stage_archive_to_mtree (OstreeRepo *self,
+gboolean ostree_repo_write_archive_to_mtree (OstreeRepo *self,
GFile *archive,
OstreeMutableTree *tree,
OstreeRepoCommitModifier *modifier,
GCancellable *cancellable,
GError **error);
-gboolean ostree_repo_stage_mtree (OstreeRepo *self,
+gboolean ostree_repo_write_mtree (OstreeRepo *self,
OstreeMutableTree *mtree,
char **out_contents_checksum,
GCancellable *cancellable,
GError **error);
-gboolean ostree_repo_stage_commit (OstreeRepo *self,
+gboolean ostree_repo_write_commit (OstreeRepo *self,
const char *branch,
const char *parent,
const char *subject,
arg = g_file_new_for_path (current_dir);
g_free (current_dir);
- if (!ostree_repo_stage_directory_to_mtree (repo, arg, mtree, modifier,
+ if (!ostree_repo_write_directory_to_mtree (repo, arg, mtree, modifier,
cancellable, error))
goto out;
}
if (strcmp (tree_type, "dir") == 0)
{
arg = g_file_new_for_path (tree);
- if (!ostree_repo_stage_directory_to_mtree (repo, arg, mtree, modifier,
+ if (!ostree_repo_write_directory_to_mtree (repo, arg, mtree, modifier,
cancellable, error))
goto out;
}
else if (strcmp (tree_type, "tar") == 0)
{
arg = g_file_new_for_path (tree);
- if (!ostree_repo_stage_archive_to_mtree (repo, arg, mtree, modifier,
+ if (!ostree_repo_write_archive_to_mtree (repo, arg, mtree, modifier,
opt_tar_autocreate_parents,
cancellable, error))
goto out;
if (!ostree_repo_read_commit (repo, tree, &arg, cancellable, error))
goto out;
- if (!ostree_repo_stage_directory_to_mtree (repo, arg, mtree, modifier,
+ if (!ostree_repo_write_directory_to_mtree (repo, arg, mtree, modifier,
cancellable, error))
goto out;
}
{
g_assert (argc > 1);
arg = g_file_new_for_path (argv[1]);
- if (!ostree_repo_stage_directory_to_mtree (repo, arg, mtree, modifier,
+ if (!ostree_repo_write_directory_to_mtree (repo, arg, mtree, modifier,
cancellable, error))
goto out;
}
goto out;
}
- if (!ostree_repo_stage_mtree (repo, mtree, &contents_checksum, cancellable, error))
+ if (!ostree_repo_write_mtree (repo, mtree, &contents_checksum, cancellable, error))
goto out;
if (opt_skip_if_unchanged && parent_commit)
goto out;
}
- if (!ostree_repo_stage_commit (repo, opt_branch, parent, opt_subject, opt_body,
+ if (!ostree_repo_write_commit (repo, opt_branch, parent, opt_subject, opt_body,
contents_checksum, root_metadata,
&commit_checksum, cancellable, error))
goto out;
cancellable, error))
goto out;
- if (!ostree_repo_stage_content_trusted (data->dest_repo, checksum,
+ if (!ostree_repo_write_content_trusted (data->dest_repo, checksum,
file_object, length,
cancellable, error))
goto out;
error))
goto out;
- if (!ostree_repo_stage_metadata_trusted (data->dest_repo, objtype, checksum, metadata,
+ if (!ostree_repo_write_metadata_trusted (data->dest_repo, objtype, checksum, metadata,
cancellable, error))
goto out;
}